<template>
  <div>
    <h1>Count的值是:{{ countStore.count }}</h1>
    <h1>Count的值是:{{ countStore.doubleCount }}</h1>
    <hr/>

    <button @click="countStore.add()">累加</button>
    <button @click="countStore.addN(2)">累加N</button>
    <button @click="countStore.addWait()">累加</button>
    <button @click="countStore.getMovleList()">请求电影列表</button>
    <hr/>

    <ul>
        <li v-for="item in countStore.movieList" :key="item.tvId">{{item.name}}</li>
    </ul>
</div>
</template>

<script lang="ts">
import { defineComponent } from "vue";

export default defineComponent({
  name: "Count",
});
</script>

<script setup lang="ts">
import useCountStore from "@/store/count";

const countStore = useCountStore();

console.log(countStore);
</script>